{if $smarty.get.print != 1}
  {include file="header.tpl"}
{else}
  <table width="100%">
    <td width="33.33%"><img src="./images/shreeSava.jpg" /></td>
    <td width="33.33%" align="center"><img src="./images/shreeGanesh.jpg" /></td>
    <td width="33.33%" align="right"><img src="./images/shreeGelMataji.jpg" /></td>
  </table>
{/if}
<head>
	<script type="text/javascript">
		function deletechecked()
		  {
		    var answer = confirm("Delete Selected Recored ?")
		    var answer1 = confirm("Are You Sure ?")
		    var answer2 = confirm("Final Delete Request...?")
		    if (answer && answer1 && answer2)
		    {
		      document.messages.submit();
		    }
		    return false;
		  }
	  </script>
 </head>
<form name="form1" action="" method="post">
			{if $smarty.get.print != 1}
    	<div align="right"><a href="billBookList.php?print=1"><font size="4" color="red">Summary Print</font></a></div>
    {else}
    &nbsp;
   {/if}	
<div>
  <table align="center" cellspacing="0" cellpadding="4" style="border:3px solid #000000; -moz-border-radius: 10px;">
    {if $smarty.get.print != 1}
    <tr class="table1">
      <th></th>
      <th></th>
      <th></th>
      <th>| <font size="3" color="red">{$l_billBookDetailId}</font> |</th>
      <th>| <font size="3" color="red">{$l_date}</font>| </th>
      <th>| <font size="3" color="red">Party</font>| </th>
      <th>| <font size="3" color="red">Total Fine</font>| </th>
      <th>| <font size="3" color="red">Total Amount</font>| </th>
      <th></th>
    </tr>
    {else}
    <tr class="table1">
      <th></th>
      <th></th>
      <th></th>
      <th>| <font size="3" color="black">{$l_billBookDetailId}</font> |</th>
      <th>| <font size="3" color="black">{$l_date}</font>| </th>
      <th>| <font size="3" color="black">Party</font>| </th>
      <th>| <font size="3" color="black">Total Fine</font>| </th>
      <th>| <font size="3" color="black">Total Amount</font>| </th>
      <th></th>
    </tr>
    {/if}
    {section name="sec" loop=$billbook|@count}
    <tr class="table2">
      <td>
        {if $smarty.get.print != 1}
          <a href="billbookAdd.php?billBookId={$billbook[sec].billBookId}"><img src="./images/b_edit.png" border="0" width="15" height="15"></a>
        {else}
          &nbsp;
        {/if}
      </td>
      <td>
        {if $smarty.get.print != 1}
          <a href="billBookDelete.php?billBookId={$billbook[sec].billBookId}&partyId={$billbook[sec].partyId}&billBookNo={$billbook[sec].billNo}"><img src="./images/b_drop.png" border="0" width="15" height="15" onClick="return deletechecked();"></a>&nbsp;
        {else}
          &nbsp;
        {/if}
      </td>
       <td>
        {if $smarty.get.print != 1}
          {if $smarty.get.print != 1}<a style="color: #FF0000" href="./billBookDetailPdf.php?billBookId={$billbook[sec].billBookId}&partyId={$billbook[sec].partyId}&billBookNo={$billbook[sec].billNo}&curDateYear={$billbook[sec].curDateYear}&curDateMonth={$billbook[sec].curDateMonth}&print=1">Print</a>{/if}
        {else}
          &nbsp;
        {/if}
      </td>
      <td align="center">{$billbook[sec].billNo}</td>
      <td align="center">{$billbook[sec].billBookDate}</td>
      <td align="center">
      {if $smarty.get.print != 1}
        <a style="color: #FF0000" href="./billBookDetail.php?billBookId={$billbook[sec].billBookId}&partyId={$billbook[sec].partyId}">{$billbook[sec].partyName}</a>
      {else}  
        <a style="color: #000000" href="./billBookDetail.php?billBookId={$billbook[sec].billBookId}&partyId={$billbook[sec].partyId}">{$billbook[sec].partyName}</a>
      {/if}
      </td>
       <td align="center">{$billbook[sec].totalFine|string_format:"%.0f"}</td>
       <td align="center">{$billbook[sec].totalAmount|string_format:"%.0f"}</td>
    </tr>
    {/section}
  </table>
</div>
</form>
{if $smarty.get.print != 1}
  {include file="footer.tpl"}
{/if}
